<form action="news.manage.php" id="form_del" name="form_del" method="post">
	<input type="hidden" name="action" id="action" value="del_js" />
    <table border="0" cellpadding="0" cellspacing="0" class="from_table2">
	  <thead>
	  <tr>
		  <th><tpl> $langSysNSel </tpl></th>	
        <th width="90%"><tpl> $langSysNJsCode </tpl></th>
		  <th><tpl> $langSysNManage </tpl></th>
      </tr>
	  </thead>
	  <tpl> if $js_array[0].news_js_id neq '' </tpl>
		  <tpl> section name=i loop=$js_array </tpl>
	 <tr>
		 <td><input name="news_js_id[]" type="checkbox" value="<tpl> $js_array[i].news_js_id </tpl>"/></td>	
		 <td width="90%" align="left">
		 	<textarea cols="60" class="tarea" style="width:500px;">&lt;script src=&quot;&lt;tpl&gt; $site_url &lt;/tpl&gt;/html/news_javascript/<tpl>$js_array[i].md5_id</tpl>.js&quot;&gt;&lt;/script&gt;</textarea>
	   </td>
		 <td><a href="javascript:;" onclick="hideMessage();ajax_modi('<tpl> $js_array[i].news_js_id </tpl>');" title="<tpl> $langSysNEdit </tpl>" class="edit_a_pic"></a> 
		</td>
	</tr>
		  <tpl> /section </tpl>
  
		  <tpl> else  </tpl>
		  <tr>
			<td colspan="6"><tpl> $langSysCNoThing </tpl></td>
		  </tr>
		<tpl> /if </tpl>
  </table>
  <div class="table-5-bottom">
  	<div style="float:left; padding-left:20px">
			<span class="btn_left">
				<input name="selectall" type="button" id="selectall" class="btn_submit" value="<tpl> $langSysNSelAll </tpl>" /></span>
				<span class="btn_left">
				<input name="negative" type="button" id="negative" class="btn_submit" value="<tpl> $langSysNSelNegative </tpl>" /></span>
				<span class="btn_left">
				<input type="button" id="delbutton" class="btn_submit" name="delbutton" value="<tpl> $langSysNDel </tpl>" />
				</span>
		  </div>
				<div style="float:right; padding-right:20px">
				<tpl> $page_list </tpl>		
				</div>
			</div>
	</form>
<div id="question" style="display:none; cursor: default; padding:10px"> 
        <b style=" font-size:14px; margin-top:10px; line-height:50px; height:50px;padding-top:10px; padding-bottom:10px"><tpl> $langSysNConfirmationDel </tpl></b> <br />
        <input type="button" id="yes" value="<tpl> $langCYes </tpl>"  style=" border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/> 
        <input type="button" id="no" value="<tpl> $langCNo </tpl>"  style="border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/>
</div> 
<script>
$(document).ready(function() {
	$('#negative').click(
		function(){
			$('#form_del input[@type=checkbox]').each(function(){
				$(this).attr('checked',!$(this).attr('checked'))
			})
		}
	);
	$('#selectall').click(
		function(){
			$('#form_del input[@type=checkbox]').each(function(){
				$(this).attr('checked',true)
			})
		}
	);
	//删除操作
	var options_del = {
		beforeSubmit:  function(){showLoading(showText);},
		success:       function(msg){
						hideLoading();
						showMessage(msg.message,msg.type);
						if(msg.type == '1'){
							ShowDiv = "result_content";
							getPageContent("news.manage.php?action=ajax_js_list&curpage=<tpl>$curpage</tpl>");
						}
					},
		type:      'post',
		dataType:  'json'
	};
	var question = $('#question')[0];
	$("#delbutton").click(function(){
		$.blockUI(question, { width: '275px' });
	});
	
	$('#yes').click(function() {
		$.unblockUI();
		$('#form_del').ajaxSubmit(options_del);	
		return false;
	});
	$('#no').click($.unblockUI);
});	

//编辑
function ajax_modi(id){
	//载入页面
	ShowDiv = "result_content";
	getPageContent("news.manage.php?action=modi_js&id="+id+"&curpage=<tpl>$curpage</tpl>");
}
</script>